package com.example.dormitory_system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.dormitory_system.domain.enetiy.Announcement;
import com.example.dormitory_system.domain.vo.student.StuAnnouncementListVO;
import com.example.dormitory_system.domain.vo.tsysuser.AnnouncementListVO;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
* @author keenan
* @description 针对表【tb_announcement(公告表)】的数据库操作Mapper
* @createDate 2025-03-26 15:26:50
* @Entity com.example.dormitory_system.domain.enetiy.Announcement
*/
public interface AnnouncementMapper extends BaseMapper<Announcement> {

    List<AnnouncementListVO> selectDynamic(Long userId, String title, Integer status);

    int updateAnnouncement(@Param("announcementId") Long announcementId,
                           @Param("status") Integer status,
                           @Param("userId") Long userId,
                           @Param("title") String title,
                           @Param("content") String content, LocalDateTime now);

    List<StuAnnouncementListVO> selectStuAnnouncementList(String title);

} 